package org.example;

import javax.swing.*;

public class Panel_3 extends JPanel {
    private JLabel loginMode;
    private JComboBox<String> chooseLogin;
    private JButton clear;
    private JButton backPassword;
    private JButton protectPassword;

    public Panel_3() {
        this.addContent();
    }

    private void addContent() {
        this.setLayout(null);
        /**
         * 边框
         */
        this.setBorder(BorderFactory.createTitledBorder("其他选项"));
        /**
         * 登录模式
         */
        this.loginMode = new JLabel();
        this.loginMode.setText("登录模式");
        this.loginMode.setBounds(20, 20, 60, 20);
        this.add(this.loginMode);
        /**
         * 模式选择框
         */
        this.chooseLogin = new JComboBox<>(new String[]{
                "普通模式", "忙碌", "离开"
        });
        this.chooseLogin.addItem("隐身模式");
        this.chooseLogin.setBounds(100, 20, 140, 25);
        this.add(this.chooseLogin);
        /**
         * 清除记录
         */
        this.clear = new JButton();
        this.clear.setText("清除记录");
        this.clear.setBounds(20, 50, 85, 25);
        this.add(this.clear);
        /**
         * 取回密码
         */
        this.backPassword = new JButton();
        this.backPassword.setText("取回密码");
        this.backPassword.setBounds(110, 50, 85, 25);
        this.add(this.backPassword);
        /**
         * 申请密码保护
         */
        this.protectPassword = new JButton();
        this.protectPassword.setText("申请密码保护");
        this.protectPassword.setBounds(200, 50, 110, 25);
        this.add(this.protectPassword);
    }
}
